package com.spancer.contentcenter.domain.entity.result;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author masisi
 * @date 2023/7/12 15:35
 * @Description 元素分页信息
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class Meta {

    private Integer currentPage;
    private Integer from;
    private Integer lastPage;
    private String path;
    private Integer perPage;
    private Integer to;
    private Integer total;
    private List<LinkInfo> links;

    class LinkInfo{
        private String url;
        private String label;
        private Boolean active = false;

        public LinkInfo() {
        }

        public LinkInfo(String url, String label, Boolean active) {
            this.url = url;
            this.label = label;
            this.active = active;
        }
    }

}
